package com.yeyks.controller.hotel;

import com.yeyks.annotation.NeedToken;
import com.yeyks.common.ajax.AjaxResponseBody;
import com.yeyks.commonReference.service.mattress.HotelMattressOverviewService;
import com.yeyks.web.AccountUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 共享床垫接口
 *
 * @author shuai
 * @date 2019-07-09
 */
@Slf4j
@Api(tags = "酒店床垫分成总览表接口")
@RestController
@RequestMapping("/hotel/mattress/overview")
public class HotelMattressOverviewController {
    @Autowired
    private HotelMattressOverviewService hotelMattressOverviewService;

    /**
     * 获取酒店床垫分成账户余额
     *
     * @return
     */
    @NeedToken
    @ApiOperation(value = "获取酒店床垫分成账户余额", notes = "获取酒店床垫分成账户余额")
    @PostMapping("/remain")
    public AjaxResponseBody<Map<String, Object>> remain() {
        return AjaxResponseBody.success(hotelMattressOverviewService.remain(AccountUtils.getLoginUser()));
    }
}
